import request from '@/router/axios';
import store from '@/store';
import { numberFormat } from "@/util/util.js";
import {
  getLineName,
  getSCOrLCOrACC,
  getStationName,
  sys_data_source_status,
  getSys_data_source_status,
  data_source_status,
  getData_source_status,
  getNotice_sate_status,
  notice_sate_status
} from "../../commonCheck";
export const tableOption = {
  height: '600',
  searchLabelWidth:100,
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  viewBtn: false,
  editBtn: false,
  delBtn: false,
  emptyBtn: false,
  align: 'center',
  selection: true,
  reserveSelection:false,
  addBtn: false,
  column: [
  // {
  //   fixed: true,
  //   label: '主键',
  //   prop: 'id',
  //   span: 24,
  //   hide: true
  // },
  {
    hide: false,
    width: 60,
    label: '线路',
    prop: 'lineCode',
    type: 'select',
    search: true,
    searchslot:true,
    cascaderItem: ["stationCode"],
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: "/check/check/getLineLists?userCode="+ store.getters.userInfo.userCode,
    display: true,
    formatter:function (row,v) {
      return getLineName(v);
    }
  }, {
    hide: false,
    label: '站点',
    width: 140,
    prop: 'stationCode',
    type: 'select',
    // cascaderItem: ["tvmCode"],
    search: true,
    searchslot:true,
    dicFlag: false,
    // props: {
    //   label: 'name',
    //   value: 'code'
    // },
    // dicUrl: "/check/check/getStationLists?userCode="+ store.getters.userInfo.userCode + "&lineCode={{key}}",
    // display: true ,// 动态显隐控制不能删除
    formatter: function(row, value , label, column){
      return getStationName(row.lineCode,value);
    }
  }, {
    hide: false,
    label: 'TVM编号',
    prop: 'tvmCode',
    type: 'select',
    search: true,
    filterable: true,
    searchslot:true,
    dicFlag: false,
    slot: true,
    props: {
      label: 'tvmCode',
      value: 'tvmCode'
    },
    dicUrl: "/check/check/getSwPmTvmCodeList?stationCode={{key}}"
  }, {
    label: '卸载状态',
    width: 70,
    prop: 'boxUninstallStatus',
    formatter :function(row, value , label, column){
      return row.boxUninstallStatusName;
    },
    search: true,
    hide: false,
    type:'select',
    dicData: [{
      label: '已卸载',
      value: 1
    },{
      label: '未卸载',
      value: 2
    },{
      label: '未卸载/已卸载',
      value: 3
    }]
  }, {
    hide: false,
    label: '系统金额',
    prop: 'systemMoney',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    },
    type:'input'
  }, {
    hide: false,
    label: '实点金额',
    prop: 'actualMoney',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    },
    type: 'input'
  }, {
    hide: false,
    label: '差异金额',
    prop: 'diffMoney',
    width: 70,
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      //return fenExYuangettoFixed2(Number(value)-Number(row.supplementMoney)+Number(row.handOutMoney)-Number(row.systemMoney));
      return num;
    },
    search: false
  }, {
    label: '手工清出金额',
    width: 120,
    prop: 'handOutMoney',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    },
    slot: true,
    editDisplay: false,
    addDisplay: false
  }, {
    hide: false,
    label: '收入日期',
    width: 90,
    prop: 'recordTime',
    type: 'datetime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    search: true,
    editDisplay: false,
    addDisplay: false
  }, {
    hide: false,
    label: '数据来源',
    prop: 'dataSource',
    formatter :function(row, value , label, column){
      return getSCOrLCOrACC(value);
    },
    search: true,
    type:'select',
    dicData: [
    //   {
    //   label: '结账单据',
    //   value: 1
    // },
    {
      label: '修正',
      value: 1
    },
    {
      label: 'SC',
      value: 2
    },{
      label: 'LC',
      value: 3
    },{
      label: 'ACC',
      value: 4
    },{
      label: '单台设备差异协查结果',
      value: 5
    }
    // ,{
    //   label: '分钱箱票款差异协查',
    //   value: 6
    // }
  ]
  }, {
    hide: false,
    label: "差异来源",
    prop: "sysDataSource",
    type: 'select',
    search: true,
    dicData: data_source_status(),
    formatter: function (row, v) {
      return getData_source_status(v);
    }
  },{
    hide: false,
    label: '审核状态',
    prop: 'auditStatus',
    formatter :function(row, value , label, column){
      return row.auditStatusName;
    },
    type:'select',
    search: true,
    searchValue: 0,
    dicData: [{
      label: '审批通过',
      value: 1
    },{
      label: '待审核',
      value: 0
    }]
  },{
    label: "审核日期",
     width: 90,
     prop: "auditTime" ,
	 format: 'yyyy-MM-dd',
     valueFormat: 'yyyy-MM-dd HH:mm:ss',
     type:'date'
  },{
    label: "审核人",
     width: 90,
      prop: "auditPersonName"
  },{
    prop:'diffReason',
    hide:true,
    label: '差异原因',
  },{
    hide: false,
    label: '是否加入报表差错',
    width: 160,
    searchLabelWidth:160,
    prop: 'isAddReprotError',
    type:'select',
    search: true,
    formatter:function(row, value , label, column){
      return value==0?'否':value==1?'是':'';
    },
    dicData: [{
      label: '是',
      value: '1'
    },{
      label: '否',
      value: '0'
    }]
  },{
    hide: false,
    label: '报表差错修改状态',
    width: 160,
    searchLabelWidth:160,
    prop: 'isModify',
    formatter:function(row, value , label, column){
      return value==0?'待修改':value==1?'已完成':'';
    },
    dicData: [{
      label: '待修改',
      value: '0'
    },{
      label: '已完成',
      value: '1'
    }]
  },{
    label: "通知状态",
    prop: "noticeSate",
    type: 'select',
    search: true,
    dicData: notice_sate_status(),
    formatter: function (row, v) {
      if (v == '0') {
        return '待通知';
      }
      return getNotice_sate_status(v);
    }
  }, {
    label: '结算开始日期',
    width: 120,
    prop: 'incomeSettleBeginTime',
    type: 'date',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    editDisplay: false,
    addDisplay: false
  }, {
    label: '结算结束日期',
    width: 120,
    prop: 'incomeSettleEndTime',
    type: 'date',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    editDisplay: false,
    addDisplay: false
  },
  {
    label: '是否补提交',
    width: 100,
    prop: 'additionalRecordingStatus',
    type: 'select',
    search: true,
    formatter:function(row, value , label, column){
      return value==0?'否':value==1?'是':'';
    },
    dicData: [{
      label: '否',
      value: '0'
    }, {
      label: '是',
      value: '1'
    }]
  }, {
    label: '录入人',
    width: 120,
    prop: 'passengerJobName',
    type:'input',
  }, {
    label: '录入人员工号',
    width: 120,
    prop: 'passengerJobNo',
    type:'input',
  },{
    label: '报表差错更改人',
    width: 120,
    prop: 'updateJobName',
    type:'input',
  }, {
    label: '更改人工号',
    width: 100,
    prop: 'updateJobNo',
    type:'input',
  }, {
    label: '更新时间',
    prop: 'updateTime',
    type:'date',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd HH:mm:ss'
  },{
    label: '补提交人',
    prop: 'repairSubmitJobName',
    type:'input',
  }, {
    label: '补提交人工号',
    width: 100,
    prop: 'repairSubmitJobNo',
    type:'input',
  }, {
    label: '补提交人时间',
    width: 150,
    prop: 'repairSubmitTime',
    type:'date',
    format: 'yyyy-MM-dd HH:mm:ss',
    valueFormat: 'yyyy-MM-dd HH:mm:ss'
  },{
    label: '修改原因备注',
    prop: 'reasonRemark',
    width: 350,
    type: 'input'
  }]
}

export const tableOptionEditTvm = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  align: 'center',
  menu: false,
  header: false,
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 140,
  column: [ {
    hide: false,
    label: '数据来源',
    prop: 'dataSource',
    formatter :function(row, value , label, column){
      return getSCOrLCOrACC(value);
    },
    type:'select',
    dicData: [
    //   {
    //   label: '结账单据',
    //   value: '1'
    // },
    {
      label: 'SC',
      value: '2'
    },{
      label: 'LC',
      value: '3'
    },{
      label: 'ACC',
      value: '4'
    },{
      label: '单台设备差异协查结果',
      value: '5'
    },{
      label: '分钱箱审核结果',
      value: '6'
    },{
      label: '修正',
      value: '1'
    }],
    disabled: true
  },
  //结账单据
   {
    type:'number',
    label: '系统售票金额',
    prop: 'tvmBillCashSellTicket',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统售票金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  }, {
    label: '系统充值金额',
    prop: 'tvmBillCashRecharge',
    type: 'number',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统充值金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  }, {
    label: '系统退款金额',
    prop: 'tvmBillCashReturn',
    type:'number',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统退款金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  },
  {
    label: '系统金额',
    prop: 'systemMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true,
  },
  {
    label: '实点金额',
    prop: 'actualMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true
  },
  {
    label: '差异金额',
    prop: 'diffMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true
  },
  //SC
  {
    type:'number',
    label: '系统售票金额',
    prop: 'scCashSellTicket',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统售票金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  }, {
    label: '系统充值金额',
    prop: 'scCashRecharge',
    type: 'number',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统充值金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  }, {
    label: '系统退款金额',
    prop: 'scCashReturn',
    type:'number',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统退款金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  },
  {
    label: '系统金额',
    prop: 'systemMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true,
  },
  {
    label: '实点金额',
    prop: 'actualMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true
  },
  {
    label: '差异金额',
    prop: 'diffMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true
  },
  //LC
  {
    type:'number',
    label: '系统售票金额',
    prop: 'lcCashSellTicket',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统售票金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  }, {
    label: '系统充值金额',
    prop: 'lcCashRecharge',
    type: 'number',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统充值金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  }, {
    label: '系统退款金额',
    prop: 'lcCashReturn',
    type:'number',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统退款金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  },
  {
    label: '系统金额',
    prop: 'systemMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true,
  },
  {
    label: '实点金额',
    prop: 'actualMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true
  },
  {
    label: '差异金额',
    prop: 'diffMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true
  },
  //ACC
  {
    type:'number',
    label: '系统售票金额',
    prop: 'accCashSellTicket',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统售票金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  }, {
    label: '系统充值金额',
    prop: 'accCashRecharge',
    type: 'number',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统充值金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  }, {
    label: '系统退款金额',
    prop: 'accCashReturn',
    type:'number',
    precision: 2,
    rules: [{
      required: true,
      message: "请填写系统退款金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  },
  {
    label: '系统金额',
    prop: 'systemMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true,
  },
  {
    label: '实点金额',
    prop: 'actualMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true
  },
  {
    label: '差异金额',
    prop: 'diffMoney',
    type:'number',
    precision: 2,
    display: false,
    disabled: true,
    hide: true
  },
  //单台设备
  {
    type:'number',
    label: '系统合计金额',
    prop: 'singleDeviceSysMoney',
    rules: [{
      required: true,
      message: "请填写系统合计金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  },
  //分钱箱
  {
    type:'number',
    label: '系统合计金额',
    prop: 'boxAuditSysMoney',
    rules: [{
      required: true,
      message: "请填写系统合计金额",
      trigger: "blur"
    }],
    display: false,
    hide: true
  },
  {
    label: '修改原因备注',
    prop: 'reasonRemark',
    width: 350,
    labelWidth: 130,
    type: 'textarea',
    rules: [{
      required: true,
      message: "请输入修改原因备注",
      trigger: "blur"
    }],
    hide: false,
    disabled: false
  }]
}
export const tableOptionEditRecordsTvm = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  align: 'center',
  menu: false,
  header: false,
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 140,
  column: [ {
    hide: false,
    label: '上次数据来源',
    prop: 'dataSource',
    formatter :function(row, value , label, column){
      return getSCOrLCOrACC(value);
    },
    type:'select',
    dicData: [{
      label: '结账单据',
      value: '1'
    },{
      label: 'SC',
      value: '2'
    },{
      label: 'LC',
      value: '3'
    },{
      label: 'ACC',
      value: '4'
    },{
      label: '单台设备差异协查结果',
      value: '5'
    },{
      label: '分钱箱审核结果',
      value: '6'
    },{
      label: '修正',
      value: '1'
    }]
  },
  //结账单据
   {
    type:'number',
    label: '系统售票金额',
    prop: 'cashSellTicket',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '系统充值金额',
    prop: 'cashRecharge',
    type: 'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '系统退款金额',
    prop: 'cashReturn',
    type:'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '系统金额更改人',
    prop: 'creatorName',
    type:'input',
  }, {
    label: '更改人工号',
    prop: 'creatorId',
    type:'input',
  }, {
    label: '更新时间',
    prop: 'createTime',
    type:'date',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd HH:mm:ss'
  }]
}
export const tableOptionEditRecordsSC = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  align: 'center',
  menu: false,
  header: false,
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 140,
  column: [ {
    hide: false,
    label: '数据来源',
    prop: 'dataSource',
    formatter :function(row, value , label, column){
      return getSCOrLCOrACC(value);
    },
    type:'select',
    dicData: [
    //   {
    //   label: '结账单据',
    //   value: '1'
    // },
    {
      label: 'SC',
      value: '2'
    },{
      label: 'LC',
      value: '3'
    },{
      label: 'ACC',
      value: '4'
    },{
      label: '单台设备差异协查结果',
      value: '5'
    },{
      label: '分钱箱审核结果',
      value: '6'
    },{
      label: '修正',
      value: '1'
    }]
  },
  //SC
  {
    type:'number',
    label: '系统售票金额',
    prop: 'scCashSellTicket',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '系统充值金额',
    prop: 'CashRecharge',
    type: 'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '系统退款金额',
    prop: 'CashReturn',
    type:'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '更改人',
    prop: 'creatorName',
    type:'input',
  }, {
    label: '更改人工号',
    prop: 'creatorId',
    type:'input',
  }, {
    label: '更新时间',
    prop: 'createTime',
    type:'date',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd HH:mm:ss'
  }]
}
export const tableOptionEditRecordsLC = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  align: 'center',
  menu: false,
  header: false,
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 140,
  column: [ {
    hide: false,
    label: '数据来源',
    prop: 'dataSource',
    formatter :function(row, value , label, column){
      return getSCOrLCOrACC(value);
    },
    type:'select',
    dicData: [
    //   {
    //   label: '结账单据',
    //   value: '1'
    // },
    {
      label: 'SC',
      value: '2'
    },{
      label: 'LC',
      value: '3'
    },{
      label: 'ACC',
      value: '4'
    },{
      label: '单台设备差异协查结果',
      value: '5'
    },{
      label: '分钱箱审核结果',
      value: '6'
    },{
      label: '修正',
      value: '1'
    }]
  },
  //LC
  {
    type:'number',
    label: '系统售票金额',
    prop: 'CashSellTicket',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '系统充值金额',
    prop: 'CashRecharge',
    type: 'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '系统退款金额',
    prop: 'CashReturn',
    type:'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '更改人',
    prop: 'creatorName',
    type:'input',
  }, {
    label: '更改人工号',
    prop: 'creatorId',
    type:'input',
  }, {
    label: '更新时间',
    prop: 'createTime',
    type:'date',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd HH:mm:ss'
  }]
}
export const tableOptionEditRecordsACC = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  align: 'center',
  menu: false,
  header: false,
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 140,
  column: [ {
    hide: false,
    label: '数据来源',
    prop: 'dataSource',
    formatter :function(row, value , label, column){
      return getSCOrLCOrACC(value);
    },
    type:'select',
    dicData: [
    //   {
    //   label: '结账单据',
    //   value: '1'
    // },
    {
      label: 'SC',
      value: '2'
    },{
      label: 'LC',
      value: '3'
    },{
      label: 'ACC',
      value: '4'
    },{
      label: '单台设备差异协查结果',
      value: '5'
    },{
      label: '分钱箱审核结果',
      value: '6'
    },{
      label: '修正',
      value: '1'
    }],
    disabled: true
  },
  //ACC
  {
    type:'number',
    label: '系统售票金额',
    prop: 'CashSellTicket',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '系统充值金额',
    prop: 'CashRecharge',
    type: 'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '系统退款金额',
    prop: 'CashReturn',
    type:'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '更改人',
    prop: 'creatorName',
    type:'input',
  }, {
    label: '更改人工号',
    prop: 'creatorId',
    type:'input',
  }, {
    label: '更新时间',
    prop: 'createTime',
    type:'date',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd HH:mm:ss'
  }]
}
export const tableOptionEditRecordsDT = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  align: 'center',
  menu: false,
  header: false,
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 140,
  column: [ {
    hide: false,
    label: '数据来源',
    prop: 'dataSource',
    formatter :function(row, value , label, column){
      return getSCOrLCOrACC(value);
    },
    type:'select',
    dicData: [
    //   {
    //   label: '结账单据',
    //   value: '1'
    // },
    {
      label: 'SC',
      value: '2'
    },{
      label: 'LC',
      value: '3'
    },{
      label: 'ACC',
      value: '4'
    },{
      label: '单台设备差异协查结果',
      value: '5'
    },{
      label: '分钱箱审核结果',
      value: '6'
    },{
      label: '修正',
      value: '1'
    }]
  },
  {
    type:'number',
    label: '系统合计金额',
    prop: 'singleDeviceSysMoney',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '更改人',
    prop: 'creatorName',
    type:'input',
  }, {
    label: '更改人工号',
    prop: 'creatorId',
    type:'input',
  }, {
    label: '更新时间',
    prop: 'createTime',
    type:'date',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd HH:mm:ss'
  }]
}
export const tableOptionEditRecordsFQX = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  align: 'center',
  menu: false,
  header: false,
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 140,
  column: [ {
    hide: false,
    label: '数据来源',
    prop: 'dataSource',
    formatter :function(row, value , label, column){
      return getSCOrLCOrACC(value);
    },
    type:'select',
    dicData: [
    //   {
    //   label: '结账单据',
    //   value: '1'
    // },
    {
      label: 'SC',
      value: '2'
    },{
      label: 'LC',
      value: '3'
    },{
      label: 'ACC',
      value: '4'
    },{
      label: '单台设备差异协查结果',
      value: '5'
    },{
      label: '分钱箱审核结果',
      value: '6'
    }]
  },
  //分钱箱
  {
    type:'number',
    label: '系统合计金额',
    prop: 'boxAuditSysMoney',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    }
  }, {
    label: '更改人',
    prop: 'creatorName',
    type:'input',
  }, {
    label: '更改人工号',
    prop: 'creatorId',
    type:'input',
  }, {
    label: '更新时间',
    prop: 'createTime',
    type:'date',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd HH:mm:ss'
  }]
}


export const formOptionView = {
  submitBtn:false,
  emptyBtn:false,
  detail:true,
  labelWidth: 180,
  column: [
    {
      "type": "select",
      "label": "交款人名称",
      "prop": "payPersonName",
      params: {
        userCodeKey: 'payPersonJobNo'
      },
      component: 'user-select',
      search: true,
    },
    {
      "type": "input",
      "label": "交款人工号",
      "prop": "payPersonJobNo",
      disabled:true,
      search: true,
    },  {
      "type": "number",
      "label": "合计清出硬币",
      "prop": "totalCleanCoinAmount",
      "precision": 2,
      display: false
    }, {
      "type": "number",
      "label": "合计清出纸币",
      "prop": "totalCleanPaperAmount",
      "precision": 2,
      display: false
    }, {
      "type": "number",
      "label": "合计清出总金额",
      "prop": "totalCleanAmount",
      "precision": 2,
      display: false
    }, {
      "type": "datetime",
      "label": "清出时间",
      "prop": "cleanTime",
      format:'yyyy-MM-dd HH:mm:ss',
      valueFormat:'yyyy-MM-dd HH:mm:ss',
    },	 {
      "type": "textarea",
      "label": "备注",
      "prop": "remark"
    },]
}


export const tableOptionView = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  tip:false,
  header: false,
  menu:false,
  "column": [
    {
      "type": "select",
      "label": "TVM编号",
      "prop": "tvmCode"
    }, {
      "type": "number",
      "label": "清出金额（硬币）",
      "prop": "clearOutAmount",
      formatter:function(row, value , label, column){
        var num = value.toFixed(2);
        return num;
      }
    }, {
      "type": "number",
      "label": "清出金额（纸币）",
      "prop": "clearOutPaperAmount",
      formatter:function(row, value , label, column){
        var num = value.toFixed(2);
        return num;
      }
    },{
      "type": "select",
      "label": "交款人名称",
      "prop": "payPersonName"
    },
    {
      "type": "input",
      "label": "交款人工号",
      "prop": "payPersonJobNo"
    }, {
      "type": "datetime",
      "label": "清出时间",
      "prop": "cleanTime",
      format:'yyyy-MM-dd HH:mm:ss',
      valueFormat:'yyyy-MM-dd HH:mm:ss'
    },	 {
      "type": "textarea",
      "label": "备注",
      "prop": "remark",
      width: 250
    }]

}
export const tvmCheckOptionView = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 120,
  "column": [{
      "type": "select",
      "label": "清点人2",
      "prop": "checkPersonTwoName",
      params: {
        userCodeKey: 'checkPersonTwoJopNo'
      },
      component: 'user-select',
      disabled: true
    },
    {
      "type": "input",
      "label": "清点人2工号",
      "prop": "checkPersonTwoJopNo",
      disabled: true
    },
    {
      type: "datetime",
      label: "清点时间",
      prop: "checkTime",
      format: "yyyy-MM-dd HH:mm:ss",
      valueFormat: "yyyy-MM-dd HH:mm:ss",
      disabled: true
    },
    {
      type: "date",
      label: "收益时间",
      prop: "revenueTime",
      format: "yyyy-MM-dd",
      valueFormat: "yyyy-MM-dd",
      disabled: true
    },
    {
      type: "textarea",
      label: "备注",
      prop: "remark",
      span: 24,
      disabled: true
    }
  ]
}
export const tvmCheckOptionDetailView = {
  detail:false,
  menu:false,
  header:false,
  arrow:false,
  addBtn: false,
  selection: false,
  column: [{
      type: "select",
      label: "TVM编号",
      prop: "tvmCode",
      cell: true,
      dicUrl: "/support/swpmtvmcode/page",
      props: {
        label: "tvmCode",
        value: "tvmCode",
        res: "data.records"
      },
      dicQuery: {
        size: -1,
        stationCode: store.getters.userInfo.stationCode,
        status: "1"
      }
    },
    // {
    //   type: "select",
    //   label: "钱箱编号",
    //   prop: "cashboxCode",
    //   filterable: true,
    //   allowCreate: true,
    //   cell: true,
    //   dicUrl:
    //     "/support/swpmtvmcashboxcode/page?size=-1&stationCode=" +
    //     store.getters.userInfo.stationCode,
    //   props: {
    //     label: "cashboxCode",
    //     value: "cashboxCode",
    //     res: "data.records"
    //   },
    //   hide: true
    // },
    {
      type: "number",
      label: "实点金额",
      prop: "realAmount",
      precision: 2,
      cell: true,
      value: "0",
      formatter: (row, value, label, column) => {
        return numberFormat(value, column.precision);
      }
    },{
      type: "number",
      label: "非标准币金额",
      prop: "nsAmount",
      precision: 2,
      cell: true,
      value: "0",
      formatter: (row, value, label, column) => {
        return numberFormat(value, column.precision);
      }
    },{
      type: "select",
      label: "未卸载原因",
      prop: "unloadCase",
      dicUrl: "/admin/dict/type/sw_st_tvm_check_detail_uninstall_reason",
      cell: true
    }
  ]
};

export function getFareDifferencesInAudit(param) {
  return request({
    url: '/check/check/getFareDifferencesInAudit',
    method: 'post',
    params: param
  })
}
export function update(obj) {
  return request({
    url: '/check/check/updateSwAuTvmAmountDefference',
    method: 'post',
    data: obj
  })
}
export function updateDifferences(param) {
  return request({
    url: '/check/check/updateDifferences',
    method: 'post',
    params: param
  })
}
export function updateAuditStatusDefference(param) {
  return request({
    url: '/check/check/updateAuditStatusDefference',
    method: 'post',
    params: param
  })
}
/**
 * 加入通知
 * @param query
 */
export function jiaRuNoticeTvm(param) {
  return request({
    url: '/check/check/jiaRuNoticeTvm',
    method: 'post',
    data: param
    //params: param
  })
}

export function insertCheckTheDocumentsInvestigation(param) {
  return request({
    url: '/check/check/insertCheckTheDocumentsInvestigation',
    method: 'post',
    params: param
  })
}
export function insertSwAuTvmCashAmountHierarchyDifference(param) {
  return request({
    url: '/check/check/insertSwAuTvmCashAmountHierarchyDifference',
    method: 'post',
    params: param
  })
}
export function syncSystemAmounts(param){
  return request({
    url: '/check/check/syncSystemAmounts',
    method: 'post',
    params: param
  })
}
export function replaceCengJiDatasourceSwAuTvmCashAmountHierarchyDifference(param){
  return request({
    url: '/check/check/replaceCengJiDatasourceSwAuTvmCashAmountHierarchyDifference',
    method: 'post',
    params: param
  })
}
export function heji(value){
  var num = value / 100;
  num = num.toFixed(2);
  return num;
}


export function chaKanJieZhangInfo(param){
  return request({
    url: '/check/check/chaKanJieZhangInfo',
    method: 'post',
    params: param
  })
}

export function fetchList(query) {
  return request({
    url: '/stm/swsthandworkcleanrecord/getHandworkCleanRecord',
    method: 'get',
    params: query
  })
}

export function queryTVM(query) {
  return request({
    url: "/stm/swsttvmcheckdetail/queryTVM",
    method: "get",
    params: query
  });
}

export function getObj(id) {
  return request({
    url: '/stm/swsthandworkcleanrecord/details/' + id,
    method: 'get'
  })
}


export function getTvmObj(id,flag) {
  return request({
    url: `/stm/swsttvmcheckdetail/details/${id}/${flag}`,
    method: "get"
  });
}

/**
 * 撤回
 * @param {} query
 * @returns
 */
 export function revoke (query) {
  return request({
    url: '/check/check/revokeTvmIds',
    method: 'put',
    params: query
  })
}

//作废TVM数据
export function cancellationTvmDate(param){
  return request({
    url: '/check/check/cancellationTvmDate',
    method: 'post',
    params: param
  })
}
//删除重复数据
export function delObj (query) {
  return request({
    url: '/check/check/delRepeatTvmData',
    method: 'get',
    params: query
  })
}